require './Modele/Client'
require "sqlite3"
class Abonne < Client
  
  def demander_entretien
      
  end
  
  def demander_livraison(parking,vehicule,date,adresse)
    unless parking.get_place_by_ticket(vehicule.immat) && parking.db.execute("select * from Livraisons where immatriculation='#{vehicule.immat}'")[0]   
      parking.db.execute("insert into Livraisons (immatriculation,date,adresse)
        VALUES ('#{vehicule.immat}','#{date}','#{adresse}') ") 
    end
  end
  
  def enregistrer_client
    @parking.db.execute("insert into Clients (nom,prenom,Abonnee,Garanti,nbVenu) 
                                values ('#{@nom}','#{@prenom}','True','False',0)")
  end
   
end